package com.huanying.framework.user;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.huanying.goodjob.community.Area;
import com.huanying.goodjob.jobtype.Jobtype;

@Entity
@Table(name="user_jobtype")
public class User_JobType {
	private static final long serialVersionUID = -2697936683291150264L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="id")
	private int id;//用户工种编号
	
	@OneToOne(optional = true)
	@JoinColumn(name = "user_id")
	private User user;//用户
	@OneToOne(optional = true)
	@JoinColumn(name = "jobtype_id")
	private Jobtype jobtype;  //工种
	//private int user_id;././
	//private int jobtype_id;
	@Column(name="status",nullable=false,columnDefinition="INT default 1")
	private int status;		//状态 ：0禁用 1可用（正常）
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Jobtype getJobtype() {
		return jobtype;
	}
	public void setJobtype(Jobtype jobtype) {
		this.jobtype = jobtype;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}

}
